package biz

import (
	"context"
	"digitalhuman/models"
	"github.com/go-kratos/kratos/v2/log"
)

type TextAudioRepo interface {
	HandleSection(textAudio *models.Storyboard) error
	Create(context.Context, *models.TextAudio) (*models.TextAudio, error)
}

type TextAudioBiz struct {
	TextAudioData TextAudioRepo
}

func NewTextAudioBiz(repo TextAudioRepo) *TextAudioBiz {
	return &TextAudioBiz{TextAudioData: repo}
}

func (t *TextAudioBiz) TextToAudio(story *models.Storyboard) {
	err := t.TextAudioData.HandleSection(story)
	if err != nil {
		log.Error(err)
	}
}
